<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: wheels::Buffer&lt; Type &gt; 模板类 参考</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../df/d8d/namespacewheels.html">wheels</a></li><li class="navelem"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="../../d3/d9e/classwheels_1_1_buffer-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">wheels::Buffer&lt; Type &gt; 模板类 参考</div></div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a>&gt;</code></p>
<div class="dynheader">
类 wheels::Buffer&lt; Type &gt; 继承关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d6/d72/classwheels_1_1_buffer__inherit__graph.png" border="0" usemap="#awheels_1_1_buffer_3_01_type_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="awheels_1_1_buffer_3_01_type_01_4_inherit__map" id="awheels_1_1_buffer_3_01_type_01_4_inherit__map">
<area shape="rect" title=" " alt="" coords="5,273,185,668"/>
<area shape="rect" href="../../d0/da6/structtype__traits.html" title=" " alt="" coords="33,155,158,224"/>
<area shape="poly" title=" " alt="" coords="98,239,98,274,93,274,93,239"/>
<area shape="rect" href="../../d0/da6/structtype__traits.html" title="类型元函数" alt="" coords="33,5,158,91"/>
<area shape="poly" title=" " alt="" coords="98,106,98,155,93,155,93,106"/>
</map>
</div>
<div class="dynheader">
wheels::Buffer&lt; Type &gt; 的协作图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d4/d1f/classwheels_1_1_buffer__coll__graph.png" border="0" usemap="#awheels_1_1_buffer_3_01_type_01_4_coll__map" alt="Collaboration graph"/></div>
<map name="awheels_1_1_buffer_3_01_type_01_4_coll__map" id="awheels_1_1_buffer_3_01_type_01_4_coll__map">
<area shape="rect" title=" " alt="" coords="5,273,185,668"/>
<area shape="rect" href="../../d0/da6/structtype__traits.html" title=" " alt="" coords="33,155,158,224"/>
<area shape="poly" title=" " alt="" coords="98,239,98,274,93,274,93,239"/>
<area shape="rect" href="../../d0/da6/structtype__traits.html" title="类型元函数" alt="" coords="33,5,158,91"/>
<area shape="poly" title=" " alt="" coords="98,106,98,155,93,155,93,106"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a0d288d3bf1d3a0614fc781504712e2b1" id="r_a0d288d3bf1d3a0614fc781504712e2b1"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0d288d3bf1d3a0614fc781504712e2b1">err_code</a> { <br />
&#160;&#160;<a class="el" href="#a0d288d3bf1d3a0614fc781504712e2b1ab8f9048b1830dcd0a76db45803e71141">ERR_BASE</a> = -1000
, <a class="el" href="#a0d288d3bf1d3a0614fc781504712e2b1a37e0a5ea92dd6f8457cb53e801e1c2a8">ERR_ALLOC_MEM</a>
, <a class="el" href="#a0d288d3bf1d3a0614fc781504712e2b1aabbdee9fa3c8df928fa845208c4aa89a">ERR_DATA_EMPTY</a>
, <a class="el" href="#a0d288d3bf1d3a0614fc781504712e2b1a8247209eff659f6bc1fe35c9de26f0b8">ERR_DEST_NULL</a>
, <br />
&#160;&#160;<a class="el" href="#a0d288d3bf1d3a0614fc781504712e2b1af3b656f07c2be4607531d66937cb85d7">ERR_SRC_NULL</a>
, <a class="el" href="#a0d288d3bf1d3a0614fc781504712e2b1adf0a4df2e14653b682290063574288a1">OK</a> = 0
<br />
 }</td></tr>
<tr class="separator:a0d288d3bf1d3a0614fc781504712e2b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_structtype__traits"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_types_structtype__traits')"><img src="../../closed.png" alt="-"/>&#160;Public 类型 继承自 <a class="el" href="../../d0/da6/structtype__traits.html">type_traits&lt; Type &gt;</a></td></tr>
<tr class="memitem:a6a8f717b002f36e14ef144dd168a26c9 inherit pub_types_structtype__traits" id="r_a6a8f717b002f36e14ef144dd168a26c9"><td class="memItemLeft" align="right" valign="top">typedef Type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/da6/structtype__traits.html#a6a8f717b002f36e14ef144dd168a26c9">value_type</a></td></tr>
<tr class="separator:a6a8f717b002f36e14ef144dd168a26c9 inherit pub_types_structtype__traits"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15400c7a025c75100c04c5dc6f94b32c inherit pub_types_structtype__traits" id="r_a15400c7a025c75100c04c5dc6f94b32c"><td class="memItemLeft" align="right" valign="top">typedef Type *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/da6/structtype__traits.html#a15400c7a025c75100c04c5dc6f94b32c">pointer</a></td></tr>
<tr class="separator:a15400c7a025c75100c04c5dc6f94b32c inherit pub_types_structtype__traits"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1fd64f5e9cf366e8e9b9ff0466c450b inherit pub_types_structtype__traits" id="r_ab1fd64f5e9cf366e8e9b9ff0466c450b"><td class="memItemLeft" align="right" valign="top">typedef Type &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/da6/structtype__traits.html#ab1fd64f5e9cf366e8e9b9ff0466c450b">refrence</a></td></tr>
<tr class="separator:ab1fd64f5e9cf366e8e9b9ff0466c450b inherit pub_types_structtype__traits"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a0491dc3933237e96a4e9fb2830c56dd5" id="r_a0491dc3933237e96a4e9fb2830c56dd5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0491dc3933237e96a4e9fb2830c56dd5">Buffer</a> ()</td></tr>
<tr class="memdesc:a0491dc3933237e96a4e9fb2830c56dd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">默认的初始化函数  <br /></td></tr>
<tr class="separator:a0491dc3933237e96a4e9fb2830c56dd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af88040bebf3c1079d7dad58f5e6a65ef" id="r_af88040bebf3c1079d7dad58f5e6a65ef"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af88040bebf3c1079d7dad58f5e6a65ef">Buffer</a> (size_t len)</td></tr>
<tr class="memdesc:af88040bebf3c1079d7dad58f5e6a65ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">按照给定的长度初始化内存。  <br /></td></tr>
<tr class="separator:af88040bebf3c1079d7dad58f5e6a65ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadce982a0a64ea1f2d8619a3fae3373a" id="r_aadce982a0a64ea1f2d8619a3fae3373a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aadce982a0a64ea1f2d8619a3fae3373a">Buffer</a> (Type *src, size_t len)</td></tr>
<tr class="memdesc:aadce982a0a64ea1f2d8619a3fae3373a"><td class="mdescLeft">&#160;</td><td class="mdescRight">按照给定的长度和数据初始化对象。按照长度分配内存，并将数据拷贝到分配好的内存中  <br /></td></tr>
<tr class="separator:aadce982a0a64ea1f2d8619a3fae3373a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1389f8ba65f8fe663d68e1da67e8644" id="r_aa1389f8ba65f8fe663d68e1da67e8644"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa1389f8ba65f8fe663d68e1da67e8644">Buffer</a> (const <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp;b)</td></tr>
<tr class="separator:aa1389f8ba65f8fe663d68e1da67e8644"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbf726eb03d559903d01786e73f7786a" id="r_acbf726eb03d559903d01786e73f7786a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#acbf726eb03d559903d01786e73f7786a">Buffer</a> (<a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp;&amp;b)</td></tr>
<tr class="separator:acbf726eb03d559903d01786e73f7786a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a322db9ba7ef3ca4971c16fc4f49ed50b" id="r_a322db9ba7ef3ca4971c16fc4f49ed50b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a322db9ba7ef3ca4971c16fc4f49ed50b">operator=</a> (const <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp;b)</td></tr>
<tr class="memdesc:a322db9ba7ef3ca4971c16fc4f49ed50b"><td class="mdescLeft">&#160;</td><td class="mdescRight">赋值重载  <br /></td></tr>
<tr class="separator:a322db9ba7ef3ca4971c16fc4f49ed50b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54abe4f74aba35623fbf68e233d42360" id="r_a54abe4f74aba35623fbf68e233d42360"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a54abe4f74aba35623fbf68e233d42360">operator=</a> (<a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp;&amp;b)</td></tr>
<tr class="separator:a54abe4f74aba35623fbf68e233d42360"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbe18f0086fba2fe0485b0bf9802cf76" id="r_adbe18f0086fba2fe0485b0bf9802cf76"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#adbe18f0086fba2fe0485b0bf9802cf76">push_back</a> (Type <a class="el" href="#a5000da57c4b9a0b9bfbef90e7aa8eab3">data</a>)</td></tr>
<tr class="memdesc:adbe18f0086fba2fe0485b0bf9802cf76"><td class="mdescLeft">&#160;</td><td class="mdescRight">在结尾添加一条数据  <br /></td></tr>
<tr class="separator:adbe18f0086fba2fe0485b0bf9802cf76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c8bca1b82e660f12bf8aca9bc38f579" id="r_a4c8bca1b82e660f12bf8aca9bc38f579"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a4c8bca1b82e660f12bf8aca9bc38f579">pop_front</a> (Type &amp;<a class="el" href="#a5000da57c4b9a0b9bfbef90e7aa8eab3">data</a>)</td></tr>
<tr class="memdesc:a4c8bca1b82e660f12bf8aca9bc38f579"><td class="mdescLeft">&#160;</td><td class="mdescRight">删除首元素，并将改元素传回的给定的参数。  <br /></td></tr>
<tr class="separator:a4c8bca1b82e660f12bf8aca9bc38f579"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fad945901a4815fdc0255e3ba864091" id="r_a6fad945901a4815fdc0255e3ba864091"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6fad945901a4815fdc0255e3ba864091">clear</a> ()</td></tr>
<tr class="memdesc:a6fad945901a4815fdc0255e3ba864091"><td class="mdescLeft">&#160;</td><td class="mdescRight">删除所有的元素。  <br /></td></tr>
<tr class="separator:a6fad945901a4815fdc0255e3ba864091"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a009977ecee8eb54275ecaf260aed85f7" id="r_a009977ecee8eb54275ecaf260aed85f7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a009977ecee8eb54275ecaf260aed85f7">erase</a> (Type d=0)</td></tr>
<tr class="memdesc:a009977ecee8eb54275ecaf260aed85f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">使用给定的数据覆盖所有的数据，并将数据长度标记为0  <br /></td></tr>
<tr class="separator:a009977ecee8eb54275ecaf260aed85f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bbcd6ef87271514166eb0148f0468fc" id="r_a6bbcd6ef87271514166eb0148f0468fc"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6bbcd6ef87271514166eb0148f0468fc">size</a> ()</td></tr>
<tr class="memdesc:a6bbcd6ef87271514166eb0148f0468fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取内容长度  <br /></td></tr>
<tr class="separator:a6bbcd6ef87271514166eb0148f0468fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8d10c0c082f9265cb92251e23b191f9" id="r_ab8d10c0c082f9265cb92251e23b191f9"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ab8d10c0c082f9265cb92251e23b191f9">length</a> ()</td></tr>
<tr class="memdesc:ab8d10c0c082f9265cb92251e23b191f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取内容长度  <br /></td></tr>
<tr class="separator:ab8d10c0c082f9265cb92251e23b191f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5000da57c4b9a0b9bfbef90e7aa8eab3" id="r_a5000da57c4b9a0b9bfbef90e7aa8eab3"><td class="memItemLeft" align="right" valign="top">Type *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a5000da57c4b9a0b9bfbef90e7aa8eab3">data</a> ()</td></tr>
<tr class="memdesc:a5000da57c4b9a0b9bfbef90e7aa8eab3"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取数据指针  <br /></td></tr>
<tr class="separator:a5000da57c4b9a0b9bfbef90e7aa8eab3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a120b0c02be1eab84ce66e944f6575133" id="r_a120b0c02be1eab84ce66e944f6575133"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a120b0c02be1eab84ce66e944f6575133">data</a> (const Type *data, size_t len)</td></tr>
<tr class="memdesc:a120b0c02be1eab84ce66e944f6575133"><td class="mdescLeft">&#160;</td><td class="mdescRight">指定数据.如果原来的内存不足，则会自动分配内存，分配成功后将数据拷贝到内存中。  <br /></td></tr>
<tr class="separator:a120b0c02be1eab84ce66e944f6575133"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37b8bd691309743927b2c6ac78039672" id="r_a37b8bd691309743927b2c6ac78039672"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a37b8bd691309743927b2c6ac78039672">append</a> (Type *<a class="el" href="#a5000da57c4b9a0b9bfbef90e7aa8eab3">data</a>, size_t len)</td></tr>
<tr class="memdesc:a37b8bd691309743927b2c6ac78039672"><td class="mdescLeft">&#160;</td><td class="mdescRight">在数据后面添加新的数据  <br /></td></tr>
<tr class="separator:a37b8bd691309743927b2c6ac78039672"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9d2d0aa80eaa7287d336f1e3c98a761" id="r_aa9d2d0aa80eaa7287d336f1e3c98a761"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa9d2d0aa80eaa7287d336f1e3c98a761">insert</a> (size_t pos, Type *<a class="el" href="#a5000da57c4b9a0b9bfbef90e7aa8eab3">data</a>, size_t len)</td></tr>
<tr class="memdesc:aa9d2d0aa80eaa7287d336f1e3c98a761"><td class="mdescLeft">&#160;</td><td class="mdescRight">在原来的数据中间添加新的数据  <br /></td></tr>
<tr class="separator:aa9d2d0aa80eaa7287d336f1e3c98a761"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01e7e91f07f875097aab943ea11f5563" id="r_a01e7e91f07f875097aab943ea11f5563"><td class="memItemLeft" align="right" valign="top">Type *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a01e7e91f07f875097aab943ea11f5563">clone</a> ()</td></tr>
<tr class="memdesc:a01e7e91f07f875097aab943ea11f5563"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造拷贝一份新的数据并返回数据指针  <br /></td></tr>
<tr class="separator:a01e7e91f07f875097aab943ea11f5563"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1761d6f2bb06c87c66f426b0b98160d7" id="r_a1761d6f2bb06c87c66f426b0b98160d7"><td class="memItemLeft" align="right" valign="top">Type *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1761d6f2bb06c87c66f426b0b98160d7">slice</a> (size_t from, size_t len)</td></tr>
<tr class="memdesc:a1761d6f2bb06c87c66f426b0b98160d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">将数据切片，返回切片的内容。  <br /></td></tr>
<tr class="separator:a1761d6f2bb06c87c66f426b0b98160d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;typename Type&gt;<br />
class wheels::Buffer&lt; Type &gt;</div>
<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00023">23</a> 行定义.</p>
</div><h2 class="groupheader">成员枚举类型说明</h2>
<a id="a0d288d3bf1d3a0614fc781504712e2b1" name="a0d288d3bf1d3a0614fc781504712e2b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d288d3bf1d3a0614fc781504712e2b1">&#9670;&#160;</a></span>err_code</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="#a0d288d3bf1d3a0614fc781504712e2b1">wheels::Buffer::err_code</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="a0d288d3bf1d3a0614fc781504712e2b1ab8f9048b1830dcd0a76db45803e71141" name="a0d288d3bf1d3a0614fc781504712e2b1ab8f9048b1830dcd0a76db45803e71141"></a>ERR_BASE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a0d288d3bf1d3a0614fc781504712e2b1a37e0a5ea92dd6f8457cb53e801e1c2a8" name="a0d288d3bf1d3a0614fc781504712e2b1a37e0a5ea92dd6f8457cb53e801e1c2a8"></a>ERR_ALLOC_MEM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a0d288d3bf1d3a0614fc781504712e2b1aabbdee9fa3c8df928fa845208c4aa89a" name="a0d288d3bf1d3a0614fc781504712e2b1aabbdee9fa3c8df928fa845208c4aa89a"></a>ERR_DATA_EMPTY&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a0d288d3bf1d3a0614fc781504712e2b1a8247209eff659f6bc1fe35c9de26f0b8" name="a0d288d3bf1d3a0614fc781504712e2b1a8247209eff659f6bc1fe35c9de26f0b8"></a>ERR_DEST_NULL&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a0d288d3bf1d3a0614fc781504712e2b1af3b656f07c2be4607531d66937cb85d7" name="a0d288d3bf1d3a0614fc781504712e2b1af3b656f07c2be4607531d66937cb85d7"></a>ERR_SRC_NULL&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a0d288d3bf1d3a0614fc781504712e2b1adf0a4df2e14653b682290063574288a1" name="a0d288d3bf1d3a0614fc781504712e2b1adf0a4df2e14653b682290063574288a1"></a>OK&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00030">30</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">构造及析构函数说明</h2>
<a id="a0491dc3933237e96a4e9fb2830c56dd5" name="a0491dc3933237e96a4e9fb2830c56dd5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0491dc3933237e96a4e9fb2830c56dd5">&#9670;&#160;</a></span>Buffer() <span class="overload">[1/5]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::Buffer </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>默认的初始化函数 </p>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00050">50</a> 行定义.</p>

</div>
</div>
<a id="af88040bebf3c1079d7dad58f5e6a65ef" name="af88040bebf3c1079d7dad58f5e6a65ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af88040bebf3c1079d7dad58f5e6a65ef">&#9670;&#160;</a></span>Buffer() <span class="overload">[2/5]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::Buffer </td>
          <td>(</td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>len</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>按照给定的长度初始化内存。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">len,最大存储长度</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">如果内存分配失败则抛出ERR_ALLOC_MEM</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00056">56</a> 行定义.</p>

</div>
</div>
<a id="aadce982a0a64ea1f2d8619a3fae3373a" name="aadce982a0a64ea1f2d8619a3fae3373a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadce982a0a64ea1f2d8619a3fae3373a">&#9670;&#160;</a></span>Buffer() <span class="overload">[3/5]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::Buffer </td>
          <td>(</td>
          <td class="paramtype">Type *</td>          <td class="paramname"><span class="paramname"><em>src</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>len</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>按照给定的长度和数据初始化对象。按照长度分配内存，并将数据拷贝到分配好的内存中 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td></td></tr>
    <tr><td class="paramname">len</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00069">69</a> 行定义.</p>

</div>
</div>
<a id="aa1389f8ba65f8fe663d68e1da67e8644" name="aa1389f8ba65f8fe663d68e1da67e8644"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa1389f8ba65f8fe663d68e1da67e8644">&#9670;&#160;</a></span>Buffer() <span class="overload">[4/5]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::Buffer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp;</td>          <td class="paramname"><span class="paramname"><em>b</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">b</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00090">90</a> 行定义.</p>

</div>
</div>
<a id="acbf726eb03d559903d01786e73f7786a" name="acbf726eb03d559903d01786e73f7786a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbf726eb03d559903d01786e73f7786a">&#9670;&#160;</a></span>Buffer() <span class="overload">[5/5]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::Buffer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp;&amp;</td>          <td class="paramname"><span class="paramname"><em>b</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00098">98</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a37b8bd691309743927b2c6ac78039672" name="a37b8bd691309743927b2c6ac78039672"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a37b8bd691309743927b2c6ac78039672">&#9670;&#160;</a></span>append()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp; <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::append </td>
          <td>(</td>
          <td class="paramtype">Type *</td>          <td class="paramname"><span class="paramname"><em>data</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>len</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>在数据后面添加新的数据 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td></td></tr>
    <tr><td class="paramname">len</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">ERR_ALLOC_MEM</td><td>ERR_SRC_NULL </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00253">253</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d7/d18/classwheels_1_1_buffer_a37b8bd691309743927b2c6ac78039672_cgraph.png" border="0" usemap="#ad7/d18/classwheels_1_1_buffer_a37b8bd691309743927b2c6ac78039672_cgraph" alt=""/></div>
<map name="ad7/d18/classwheels_1_1_buffer_a37b8bd691309743927b2c6ac78039672_cgraph" id="ad7/d18/classwheels_1_1_buffer_a37b8bd691309743927b2c6ac78039672_cgraph">
<area shape="rect" title="在数据后面添加新的数据" alt="" coords="5,5,160,32"/>
<area shape="rect" href="../../d7/d18/classwheels_1_1_buffer.html#a5000da57c4b9a0b9bfbef90e7aa8eab3" title="读取数据指针" alt="" coords="208,5,345,32"/>
<area shape="poly" title=" " alt="" coords="160,16,192,16,192,21,160,21"/>
</map>
</div>

</div>
</div>
<a id="a6fad945901a4815fdc0255e3ba864091" name="a6fad945901a4815fdc0255e3ba864091"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6fad945901a4815fdc0255e3ba864091">&#9670;&#160;</a></span>clear()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::clear </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>删除所有的元素。 </p>
<dl class="section note"><dt>注解</dt><dd>这个函数只是将所有长度标记清零，并不修改实际数 </dd></dl>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00177">177</a> 行定义.</p>

</div>
</div>
<a id="a01e7e91f07f875097aab943ea11f5563" name="a01e7e91f07f875097aab943ea11f5563"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a01e7e91f07f875097aab943ea11f5563">&#9670;&#160;</a></span>clone()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Type * <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::clone </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>构造拷贝一份新的数据并返回数据指针 </p>
<dl class="section return"><dt>返回</dt><dd>成功操作返回数据指针，否则返回空指针 </dd></dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">内存分配失败则抛出ERR_ALLOC_MEM；如果源数据不存在则抛出ERR_SRC_NULL</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>注解</dt><dd>拷贝的数据必须在外部进行释放。释放应该使用free进行操作。 </dd></dl>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00319">319</a> 行定义.</p>

</div>
</div>
<a id="a5000da57c4b9a0b9bfbef90e7aa8eab3" name="a5000da57c4b9a0b9bfbef90e7aa8eab3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5000da57c4b9a0b9bfbef90e7aa8eab3">&#9670;&#160;</a></span>data() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Type * <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::data </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>读取数据指针 </p>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00204">204</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d7/d18/classwheels_1_1_buffer_a5000da57c4b9a0b9bfbef90e7aa8eab3_icgraph.png" border="0" usemap="#ad7/d18/classwheels_1_1_buffer_a5000da57c4b9a0b9bfbef90e7aa8eab3_icgraph" alt=""/></div>
<map name="ad7/d18/classwheels_1_1_buffer_a5000da57c4b9a0b9bfbef90e7aa8eab3_icgraph" id="ad7/d18/classwheels_1_1_buffer_a5000da57c4b9a0b9bfbef90e7aa8eab3_icgraph">
<area shape="rect" title="读取数据指针" alt="" coords="229,107,366,133"/>
<area shape="rect" href="../../d7/d18/classwheels_1_1_buffer.html#a37b8bd691309743927b2c6ac78039672" title="在数据后面添加新的数据" alt="" coords="16,5,170,32"/>
<area shape="poly" title=" " alt="" coords="265,99,225,72,180,46,150,35,152,30,182,42,228,67,268,95"/>
<area shape="rect" href="../../d7/d18/classwheels_1_1_buffer.html#a120b0c02be1eab84ce66e944f6575133" title="指定数据.如果原来的内存不足，则会自动分配内存，分配成功后将数据拷贝到内存中。" alt="" coords="24,56,162,83"/>
<area shape="poly" title=" " alt="" coords="225,105,149,86,150,81,226,100"/>
<area shape="rect" href="../../d7/d18/classwheels_1_1_buffer.html#aa9d2d0aa80eaa7287d336f1e3c98a761" title="在原来的数据中间添加新的数据" alt="" coords="21,107,165,133"/>
<area shape="poly" title=" " alt="" coords="213,123,166,123,166,117,213,117"/>
<area shape="rect" href="../../d7/d18/classwheels_1_1_buffer.html#a4c8bca1b82e660f12bf8aca9bc38f579" title="删除首元素，并将改元素传回的给定的参数。" alt="" coords="26,157,160,200"/>
<area shape="poly" title=" " alt="" coords="235,141,161,162,159,157,233,135"/>
<area shape="rect" href="../../d7/d18/classwheels_1_1_buffer.html#adbe18f0086fba2fe0485b0bf9802cf76" title="在结尾添加一条数据" alt="" coords="5,224,181,251"/>
<area shape="poly" title=" " alt="" coords="273,146,232,181,182,214,154,226,152,221,179,210,229,177,270,142"/>
</map>
</div>

</div>
</div>
<a id="a120b0c02be1eab84ce66e944f6575133" name="a120b0c02be1eab84ce66e944f6575133"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a120b0c02be1eab84ce66e944f6575133">&#9670;&#160;</a></span>data() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp; <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::data </td>
          <td>(</td>
          <td class="paramtype">const Type *</td>          <td class="paramname"><span class="paramname"><em>data</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>len</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>指定数据.如果原来的内存不足，则会自动分配内存，分配成功后将数据拷贝到内存中。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td></td></tr>
    <tr><td class="paramname">len</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">ERR_ALLOC_MEM,ERR_SRC_NULL</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00214">214</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d7/d18/classwheels_1_1_buffer_a120b0c02be1eab84ce66e944f6575133_cgraph.png" border="0" usemap="#ad7/d18/classwheels_1_1_buffer_a120b0c02be1eab84ce66e944f6575133_cgraph" alt=""/></div>
<map name="ad7/d18/classwheels_1_1_buffer_a120b0c02be1eab84ce66e944f6575133_cgraph" id="ad7/d18/classwheels_1_1_buffer_a120b0c02be1eab84ce66e944f6575133_cgraph">
<area shape="rect" title="指定数据.如果原来的内存不足，则会自动分配内存，分配成功后将数据拷贝到内存中。" alt="" coords="5,5,143,32"/>
<area shape="rect" href="../../d7/d18/classwheels_1_1_buffer.html#a5000da57c4b9a0b9bfbef90e7aa8eab3" title="读取数据指针" alt="" coords="191,5,328,32"/>
<area shape="poly" title=" " alt="" coords="143,16,175,16,175,21,143,21"/>
</map>
</div>

</div>
</div>
<a id="a009977ecee8eb54275ecaf260aed85f7" name="a009977ecee8eb54275ecaf260aed85f7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a009977ecee8eb54275ecaf260aed85f7">&#9670;&#160;</a></span>erase()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::erase </td>
          <td>(</td>
          <td class="paramtype">Type</td>          <td class="paramname"><span class="paramname"><em>d</em></span><span class="paramdefsep"> = </span><span class="paramdefval">0</span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>使用给定的数据覆盖所有的数据，并将数据长度标记为0 </p>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00183">183</a> 行定义.</p>

</div>
</div>
<a id="aa9d2d0aa80eaa7287d336f1e3c98a761" name="aa9d2d0aa80eaa7287d336f1e3c98a761"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa9d2d0aa80eaa7287d336f1e3c98a761">&#9670;&#160;</a></span>insert()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp; <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::insert </td>
          <td>(</td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>pos</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Type *</td>          <td class="paramname"><span class="paramname"><em>data</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>len</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>在原来的数据中间添加新的数据 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">pos</td><td>要插入数据的位置 </td></tr>
    <tr><td class="paramname">data</td><td>要插入的数据 </td></tr>
    <tr><td class="paramname">len</td><td>数据长度 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">如果源数据指针空或者长度为0，抛出ERR_SRC_NULL,如果内存分配失败，抛出ERR_ALLOC_MEM</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00287">287</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d7/d18/classwheels_1_1_buffer_aa9d2d0aa80eaa7287d336f1e3c98a761_cgraph.png" border="0" usemap="#ad7/d18/classwheels_1_1_buffer_aa9d2d0aa80eaa7287d336f1e3c98a761_cgraph" alt=""/></div>
<map name="ad7/d18/classwheels_1_1_buffer_aa9d2d0aa80eaa7287d336f1e3c98a761_cgraph" id="ad7/d18/classwheels_1_1_buffer_aa9d2d0aa80eaa7287d336f1e3c98a761_cgraph">
<area shape="rect" title="在原来的数据中间添加新的数据" alt="" coords="5,5,150,32"/>
<area shape="rect" href="../../d7/d18/classwheels_1_1_buffer.html#a5000da57c4b9a0b9bfbef90e7aa8eab3" title="读取数据指针" alt="" coords="198,5,335,32"/>
<area shape="poly" title=" " alt="" coords="150,16,182,16,182,21,150,21"/>
</map>
</div>

</div>
</div>
<a id="ab8d10c0c082f9265cb92251e23b191f9" name="ab8d10c0c082f9265cb92251e23b191f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8d10c0c082f9265cb92251e23b191f9">&#9670;&#160;</a></span>length()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::length </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>读取内容长度 </p>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00197">197</a> 行定义.</p>

</div>
</div>
<a id="a54abe4f74aba35623fbf68e233d42360" name="a54abe4f74aba35623fbf68e233d42360"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54abe4f74aba35623fbf68e233d42360">&#9670;&#160;</a></span>operator=() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp; <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::operator= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp;&amp;</td>          <td class="paramname"><span class="paramname"><em>b</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00116">116</a> 行定义.</p>

</div>
</div>
<a id="a322db9ba7ef3ca4971c16fc4f49ed50b" name="a322db9ba7ef3ca4971c16fc4f49ed50b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a322db9ba7ef3ca4971c16fc4f49ed50b">&#9670;&#160;</a></span>operator=() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp; <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp;</td>          <td class="paramname"><span class="paramname"><em>b</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>赋值重载 </p>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00106">106</a> 行定义.</p>

</div>
</div>
<a id="a4c8bca1b82e660f12bf8aca9bc38f579" name="a4c8bca1b82e660f12bf8aca9bc38f579"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c8bca1b82e660f12bf8aca9bc38f579">&#9670;&#160;</a></span>pop_front()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp; <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::pop_front </td>
          <td>(</td>
          <td class="paramtype">Type &amp;</td>          <td class="paramname"><span class="paramname"><em>data</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>删除首元素，并将改元素传回的给定的参数。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data,接受首元素的值</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00150">150</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d7/d18/classwheels_1_1_buffer_a4c8bca1b82e660f12bf8aca9bc38f579_cgraph.png" border="0" usemap="#ad7/d18/classwheels_1_1_buffer_a4c8bca1b82e660f12bf8aca9bc38f579_cgraph" alt=""/></div>
<map name="ad7/d18/classwheels_1_1_buffer_a4c8bca1b82e660f12bf8aca9bc38f579_cgraph" id="ad7/d18/classwheels_1_1_buffer_a4c8bca1b82e660f12bf8aca9bc38f579_cgraph">
<area shape="rect" title="删除首元素，并将改元素传回的给定的参数。" alt="" coords="5,5,139,48"/>
<area shape="rect" href="../../d7/d18/classwheels_1_1_buffer.html#a5000da57c4b9a0b9bfbef90e7aa8eab3" title="读取数据指针" alt="" coords="187,13,324,40"/>
<area shape="poly" title=" " alt="" coords="139,24,171,24,171,29,139,29"/>
</map>
</div>

</div>
</div>
<a id="adbe18f0086fba2fe0485b0bf9802cf76" name="adbe18f0086fba2fe0485b0bf9802cf76"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adbe18f0086fba2fe0485b0bf9802cf76">&#9670;&#160;</a></span>push_back()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">Buffer</a>&lt; Type &gt; &amp; <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::push_back </td>
          <td>(</td>
          <td class="paramtype">Type</td>          <td class="paramname"><span class="paramname"><em>data</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>在结尾添加一条数据 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>， 要添加的数据 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回当前对象 </dd></dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">内存分配失败后抛出ERR_EMPTY_DATA</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00129">129</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d7/d18/classwheels_1_1_buffer_adbe18f0086fba2fe0485b0bf9802cf76_cgraph.png" border="0" usemap="#ad7/d18/classwheels_1_1_buffer_adbe18f0086fba2fe0485b0bf9802cf76_cgraph" alt=""/></div>
<map name="ad7/d18/classwheels_1_1_buffer_adbe18f0086fba2fe0485b0bf9802cf76_cgraph" id="ad7/d18/classwheels_1_1_buffer_adbe18f0086fba2fe0485b0bf9802cf76_cgraph">
<area shape="rect" title="在结尾添加一条数据" alt="" coords="5,5,181,32"/>
<area shape="rect" href="../../d7/d18/classwheels_1_1_buffer.html#a5000da57c4b9a0b9bfbef90e7aa8eab3" title="读取数据指针" alt="" coords="229,5,366,32"/>
<area shape="poly" title=" " alt="" coords="181,16,213,16,213,21,181,21"/>
</map>
</div>

</div>
</div>
<a id="a6bbcd6ef87271514166eb0148f0468fc" name="a6bbcd6ef87271514166eb0148f0468fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6bbcd6ef87271514166eb0148f0468fc">&#9670;&#160;</a></span>size()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::size </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>读取内容长度 </p>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00191">191</a> 行定义.</p>

</div>
</div>
<a id="a1761d6f2bb06c87c66f426b0b98160d7" name="a1761d6f2bb06c87c66f426b0b98160d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1761d6f2bb06c87c66f426b0b98160d7">&#9670;&#160;</a></span>slice()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Type * <a class="el" href="../../d7/d18/classwheels_1_1_buffer.html">wheels::Buffer</a>&lt; Type &gt;::slice </td>
          <td>(</td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>from</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>len</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>将数据切片，返回切片的内容。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">from</td><td></td></tr>
    <tr><td class="paramname">len</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a> 第 <a class="el" href="../../da/d1d/buffer_8hpp_source.html#l00338">338</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>include/<a class="el" href="../../da/d1d/buffer_8hpp_source.html">buffer.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
